package com.cw.DesignModel23.Behavioral.MementoPattern;

/**
 * 文档的备忘录类
 *      主要用于存储文档的各种属性状态信息
 *  备忘录 快照 没有 set 方法
 *      只能通过构造函数设置备忘录数据
 */
public class ArticleMemento {
    private String title;
    private String content;
    private String image;

    public ArticleMemento(String title, String content, String image) {
        this.title = title;
        this.content = content;
        this.image = image;
    }

    public String getTitle() {
        return title;
    }

    public String getContent() {
        return content;
    }

    public String getImage() {
        return image;
    }

    @Override
    public String toString() {
        return "ArticleMemento{" +
                "title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", image='" + image + '\'' +
                '}';
    }
}

